<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>我的订单</title>
    <link rel="stylesheet" type="text/css" href="../../css/wodedingdan.css"/>
    <script src="../../js/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/js/wodedingdan.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="div">
    <!--头1-->
    <div id="head">
        <div id="title">
            <span id="logo"><a href="/kfRoom/kfRoomyd#shouyebufen">王府井永光酒店</a></span>
            <span class="dh"><a href="/kfRoom/kfRoomyd#shouyebufen">首页</a></span>
            <span class="dh"><a href="/kfRoom/kfRoomyd#fangjianyuding">房间预定</a></span>
            <span class="dh"><a href="/kfRoom/kfRoomyd#jiudianxiangqing">酒店详情</a></span>
            <span class="dh"><a href="/kfRoom/kfRoomyd#pingjia">评价</a></span>
            <span class="dh"><a href="/user/jump2">我的订单</a></span>

            <span class="dh"><a href="/login.jsp">登录</a>
                <a href="/logout">注销</a>
            </span>
            <span class="dh">
                用户名：${userinfo.username}
            </span>
        </div>
    </div>
    <div id="headTS"></div>

    <div id="content">
        <!--左边列表-->
        <div id="left">
            <ul>
                <li class="wdxxx">我的信息</li>
                <li class="ddxxx">订单信息</li>
                <!--<li class="wdxiaoxix">我的消息</li>-->
                <li class="zhaqx">账户安全</li>
            </ul>
        </div>

        <!--右边内容-->
        <div id="right">
            <!--我的信息-->
            <div id="wdxx">
                <div class="right_title">
                    我的信息
                </div>
                <div id="wdxx_tp">
                    <div>我的头像</div>
                    <img src="${userinfo.imageUrl}" />
                </div>
                <table border="0" cellpadding="20px">
                    <tr>
                        <td>用户名：</td>
                        <td>${userinfo.username}</td>
                    </tr>
                    <tr>
                        <td>昵称：</td>
                        <td>${userinfo.nickname}</td>
                    </tr>
                    <tr>
                        <td>真实姓名：</td>
                        <td>${userinfo.realname}</td>
                    </tr>
                    <tr>
                        <td>性别：</td>
                        <td>
                            <c:if test="${userinfo.gender=='1'}">男</c:if>
                            <c:if test="${userinfo.gender=='0'}">女</c:if>
                        </td>
                    </tr>
                    <tr>
                        <td>email：</td>
                        <td>${userinfo.email}</td>
                    </tr>
                    <tr>
                        <td>电话号码：</td>
                        <td>${userinfo.phone}</td>
                    </tr>
                </table>
            </div>

            <!--订单信息-->
            <div id="ddxx">
                <div class="right_title">
                    订单信息
                </div>
                <div id="ddxx_title">
                    <span  class="ddxxxq ddxx_qbdd">全部订单</span>
                    <span  class="ddxxxq ddxx_ddp">已完成</span>
                    <span  class="ddxxxq ddxx_ycs">进行中</span>
                    <span  class="ddxxxq ddxx_quxiao" >已取消订单</span>
                    <span  class="ddxxxq ddxx_jxz" >预定</span>
                    <span  class="ddxxxq ddxx_daipj" >待评论</span>
                </div>
<%--                查询全部订单信息--%>
                <div class="ddxx_show ddxx_qbddx" id="quanbudingdan">
                    <c:forEach items="${pageInfo.list}" var="o">
                        <div class="ddxx_xxxx">
                            <table cellpadding="10px">
                                <tr>
                                    <td rowspan="3" class="ddxx_mingcheng">王府井永光酒店</td>
                                    <td>${o.orderYdTime} —— ${o.orderRzTime}</td>
                                    <td class="ddxx_money">${o.orderPayMoney}</td>
                                </tr>
                                <tr>
                                    <td>观潮景区临江路3号</td>
                                    <c:if test="${o.orderStatus=='0'}"><td class="ddxx_jinxinzhong">预定</td></c:if>
                                    <c:if test="${o.orderStatus=='1'}"><td class="ddxx_jinxinzhong" style="color: red;">已取消订单</td></c:if>
                                    <c:if test="${o.orderStatus=='2'}"><td class="ddxx_jinxinzhong">进行中</td></c:if>
                                    <c:if test="${o.orderStatus=='3'}">
                                        <td class="ddxx_jinxinzhong">已完成</td>
                                        <c:if test="${o.evaStatus=='0'}">
                                            <td><a href="##" class="ddxx_dianp" onclick="eva(${o.kfId},${o.id})" >点评</a></td>
                                        </c:if>
                                        <c:if test="${o.evaStatus=='1'}">
                                            <td><a href="##" class="ddxx_dianp" >已点评</a></td>
                                        </c:if>
                                    </c:if>

                                </tr>
                                <tr>
                                    <td>客房类别：${o.typeName}</td>
                                </tr>
                            </table>
                        </div>
                    </c:forEach>

                    <div id="ddxx_fenye">
                        <a href="/user/jump2?pageNow=1" >首页</a>
                        <a href="/user/jump2?pageNow=${pageInfo.prePage>0?pageInfo.prePage:1}">上一页</a>
                        <c:forEach begin="1" end="${pageInfo.pages}" var="s">
                            <a href="/user/jump2?pageNow=${s}">${s}</a>
                        </c:forEach>
                        <a href="/user/jump2?pageNow=${pageInfo.nextPage<=0?pageInfo.pages:pageInfo.nextPage}">下一页</a>
                        <a href="/user/jump2?pageNow=${pageInfo.pages}">尾页</a>
                        <span>${pageInfo.pageNum}/${pageInfo.pages}页</span>
                        <span>共${pageInfo.total}条</span>
                    </div>
                </div>
<%--                已完成订单信息--%>
                <div class="ddxx_show ddxx_qbddx" id="tui">
                    <c:forEach items="${pageInfo1.list}" var="o">
                        <div class="ddxx_xxxx">
                            <table cellpadding="10px">
                                <tr>
                                    <td rowspan="3" class="ddxx_mingcheng">王府井永光酒店</td>
                                    <td>${o.orderYdTime} —— ${o.orderRzTime}</td>
                                    <td class="ddxx_money">${o.orderPayMoney}</td>
                                </tr>
                                <tr>
                                    <td>观潮景区临江路3号</td>
                                    <c:if test="${o.orderStatus=='3'}">
                                        <td class="ddxx_jinxinzhong">已完成</td>
                                        <c:if test="${o.evaStatus=='0'}">
                                            <td><a href="##" class="ddxx_dianp" onclick="eva(${o.kfId},${o.id})" >点评</a></td>
                                        </c:if>
                                        <c:if test="${o.evaStatus=='1'}">
                                            <td><a href="##" class="ddxx_dianp" >已点评</a></td>
                                        </c:if>
                                    </c:if>
                                </tr>
                                <tr>
                                    <td>客房类别：${o.typeName}</td>
                                </tr>
                            </table>
                        </div>
                    </c:forEach>

                    <div id="ddxx_fenye">
                        <a href="/user/jump2?pageNow1=1">首页</a>
                        <a href="/user/jump2?pageNow1=${pageInfo1.prePage>0?pageInfo1.prePage:1}">上一页</a>
                        <c:forEach begin="1" end="${pageInfo1.pages}" var="s">
                            <a href="/user/jump2?pageNow1=${s}">${s}</a>
                        </c:forEach>
                        <a href="/user/jump2?pageNow1=${pageInfo1.nextPage<=0?pageInfo1.pages:pageInfo1.nextPage}">下一页</a>
                        <a href="/user/jump2?pageNow1=${pageInfo1.pages}">尾页</a>
                        <span>${pageInfo1.pageNum}/${pageInfo1.pages}页</span>
                        <span>共${pageInfo1.total}条</span>
                    </div>
                </div>
<%--                进行中订单信息--%>
                <div class="ddxx_show ddxx_qbddx" id="rzhu">
                    <c:forEach items="${pageInfo2.list}" var="o">
                        <div class="ddxx_xxxx">
                            <table cellpadding="10px">
                                <tr>
                                    <td rowspan="3" class="ddxx_mingcheng">王府井永光酒店</td>
                                    <td>${o.orderYdTime} —— ${o.orderRzTime}</td>
                                    <td class="ddxx_money">${o.orderPayMoney}</td>
                                </tr>
                                <tr>
                                    <td>观潮景区临江路3号</td>
                                    <td class="ddxx_jinxinzhong">进行中</td>
                                </tr>
                                <tr>
                                    <td>客房类别：${o.typeName}</td>
                                </tr>
                            </table>
                        </div>
                    </c:forEach>

                    <div id="ddxx_fenye">
                        <a href="/user/jump2?pageNow2=1">首页</a>
                        <a href="/user/jump2?pageNow2=${pageInfo2.prePage>0?pageInfo2.prePage:1}">上一页</a>
                        <c:forEach begin="1" end="${pageInfo2.pages}" var="s">
                            <a href="/user/jump2?pageNow2=${s}">${s}</a>
                        </c:forEach>
                        <a href="/user/jump2?pageNow2=${pageInfo2.nextPage<=0?pageInfo2.pages:pageInfo.nextPage}">下一页</a>
                        <a href="/user/jump2?pageNow2=${pageInfo2.pages}">尾页</a>
                        <span>${pageInfo2.pageNum}/${pageInfo2.pages}页</span>
                        <span>共${pageInfo2.total}条</span>
                    </div>
                </div>
<%--                已取消订单信息--%>
                <div class="ddxx_show ddxx_qbddx" id="quxiao">
                    <c:forEach items="${pageInfo3.list}" var="o">
                        <div class="ddxx_xxxx">
                            <table cellpadding="10px">
                                <tr>
                                    <td rowspan="3" class="ddxx_mingcheng">王府井永光酒店</td>
                                    <td>${o.orderYdTime} —— ${o.orderRzTime}</td>
                                    <td class="ddxx_money">${o.orderPayMoney}</td>
                                </tr>
                                <tr>
                                    <td>观潮景区临江路3号</td>
                                    <td class="ddxx_jinxinzhong" style="color: red;">已取消订单</td>
                                </tr>
                                <tr>
                                    <td>客房类别：${o.typeName}</td>
                                </tr>
                            </table>
                        </div>
                    </c:forEach>

                    <div id="ddxx_fenye">
                        <a href="/user/jump2?pageNow3=1">首页</a>
                        <a href="/user/jump2?pageNow3=${pageInfo3.prePage>0?pageInfo3.prePage:1}">上一页</a>
                        <c:forEach begin="1" end="${pageInfo3.pages}" var="s">
                            <a href="/user/jump2?pageNow3=${s}">${s}</a>
                        </c:forEach>
                        <a href="/user/jump2?pageNow3=${pageInfo3.nextPage<=0?pageInfo3.pages:pageInfo3.nextPage}">下一页</a>
                        <a href="/user/jump2?pageNow3=${pageInfo3.pages}">尾页</a>
                        <span>${pageInfo3.pageNum}/${pageInfo3.pages}页</span>
                        <span>共${pageInfo3.total}条</span>
                    </div>
                </div>
<%--                预定订单信息--%>
                <div class="ddxx_show ddxx_qbddx" id="yd">
                    <c:forEach items="${pageInfo4.list}" var="o">
                        <div class="ddxx_xxxx">
                            <table cellpadding="10px">
                                <tr>
                                    <td rowspan="3" class="ddxx_mingcheng">王府井永光酒店</td>
                                    <td>${o.orderYdTime} —— ${o.orderRzTime}</td>
                                    <td class="ddxx_money">${o.orderPayMoney}</td>
                                </tr>
                                <tr>
                                    <td>观潮景区临江路3号</td>
                                    <td class="ddxx_jinxinzhong">预定</td>
                                </tr>
                                <tr>
                                    <td>客房类别：${o.typeName}</td>
                                </tr>
                            </table>
                        </div>
                    </c:forEach>

                    <div id="ddxx_fenye">
                        <a href="/user/jump2?pageNow4=1">首页</a>
                        <a href="/user/jump2?pageNow4=${pageInfo4.prePage>0?pageInfo4.prePage:1}">上一页</a>
                        <c:forEach begin="1" end="${pageInfo4.pages}" var="s">
                            <a href="/user/jump2?pageNow4=${s}">${s}</a>
                        </c:forEach>
                        <a href="/user/jump2?pageNow4=${pageInfo4.nextPage<=0?pageInfo4.pages:pageInfo4.nextPage}">下一页</a>
                        <a href="/user/jump2?pageNow4=${pageInfo4.pages}">尾页</a>
                        <span>${pageInfo4.pageNum}/${pageInfo4.pages}页</span>
                        <span>共${pageInfo4.total}条</span>
                    </div>
                </div>
<%--                待评价订单信息--%>
                <div class="ddxx_show ddxx_qbddx" id="daipj">
                    <c:forEach items="${pageInfo5.list}" var="o">
                        <div class="ddxx_xxxx">
                            <table cellpadding="10px">
                                <tr>
                                    <td rowspan="3" class="ddxx_mingcheng">王府井永光酒店</td>
                                    <td>${o.orderYdTime} —— ${o.orderRzTime}</td>
                                    <td class="ddxx_money">${o.orderPayMoney}</td>
                                </tr>
                                <tr>
                                    <td>观潮景区临江路3号</td>
                                        <td class="ddxx_jinxinzhong">已完成</td>
                                        <td><a href="##" class="ddxx_dianp" onclick="eva(${o.kfId},${o.id})" >点评</a></td>
                                </tr>
                                <tr>
                                    <td>客房类别：${o.typeName}</td>
                                </tr>
                            </table>
                        </div>
                    </c:forEach>

                    <div id="ddxx_fenye">
                        <a href="/user/jump2?pageNow5=1">首页</a>
                        <a href="/user/jump2?pageNow5=${pageInfo5.prePage>0?pageInfo5.prePage:1}">上一页</a>
                        <c:forEach begin="1" end="${pageInfo5.pages}" var="s">
                            <a href="/user/jump2?pageNow5=${s}">${s}</a>
                        </c:forEach>
                        <a href="/user/jump2?pageNow5=${pageInfo5.nextPage<=0?pageInfo5.pages:pageInfo5.nextPage}">下一页</a>
                        <a href="/user/jump2?pageNow5=${pageInfo5.pages}">尾页</a>
                        <span>${pageInfo5.pageNum}/${pageInfo5.pages}页</span>
                        <span>共${pageInfo5.total}条</span>
                    </div>
                </div>
            </div>

            <!--我的消息-->
            <div id="wdxiaoxi">
                <div class="right_title">
                    我的消息
                </div>
            </div>

            <!--账户安全-->
            <div id="zhaq">
                <div class="right_title">
                    账户安全
                </div>
                <div class="zhaq_content">
                    <div class="zhaq_content_img">
                        <img src="../../img/gougou.png"/>
                    </div>
                    <div class="zhaq_content_grxx">个人信息</div>
                    <span class="zhaq_content_ct">修改个人信息不包括修改密码、手机号、邮箱</span>
                    <span class="zhaq_grxx_xiugai"><a href="##" onclick="updUser()">修改</a></span>
                </div>
                <div class="zhaq_content">
                    <div class="zhaq_content_img">
                        <img src="../../img/gougou.png"/>
                    </div>
                    <div class="zhaq_content_grxx">登录密码</div>
                    <span class="zhaq_content_ct">建议定期更换</span>
                    <span class="zhaq_denglumima"><a href="##" onclick="changePass()" >修改</a></span>
                </div>
            </div>
        </div>

    </div>

    <!--页脚-->
    <div id="" style="margin-top: 100px;">
        <img src="../../img/yejiao2.png"/>
    </div>
</div>
<!-- layer javascript -->
<script src="../../js/plugins/layer/layer.min.js"></script>
</body>
<script type="text/javascript">

    function updUser(){
        layer.open({
            type:2,
            content:'/user/jump1',
            area :['800px','600px'],
        });
    }

    function changePass(){
        layer.open({
            type:2,
            content:'/user/jump3',
            area :['800px','600px'],
        });
    }

    function eva(kfId,orderId){
        layer.open({
            type:2,
            content:'/index/eva?kfId='+kfId+'&orderId='+orderId,
            area :['800px','600px'],
        });
    }
    //
    // function ing(o){
    //     alert(123);
    //     $.ajax({
    //        type:"post",
    //        url:"/user/jump2",
    //        data:{"orderStatus":o},
    //        dataType: "json",
    //        success:function (data){
    //            alert(123456)
    //        }
    //     });
    // }

    // function importUser(){
    //     var fileObj = $("#file");
    //     var fileEle=fileObj[0].files[0];
    //     var formData = new FormData();
    //     formData.append("file",fileEle);
    //     $.ajax({
    //         type:"post",
    //         url:"/user/importUser",
    //         data:formData,
    //         dataType: "text",
    //         contentType:false,
    //         cache:false,
    //         processData:false,
    //         success:function (data){
    //             if(data=="success"){
    //                 alert("导入成功");
    //                 $("#file").val("");
    //                 location.href="/user/userPage";
    //             }
    //
    //         }
    //     });
    // }
</script>
</html>
